<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>宜鲜生</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <!-- load css -->
    <link rel="stylesheet" type="text/css" href="../css/bootstrap.min.css?v=v3.3.7" media="all">
    <link rel="stylesheet" type="text/css" href="../css/font/iconfont.css?v=1.0.0" media="all">
    <link rel="stylesheet" type="text/css" href="../css/layui.css?v=1.0.9" media="all">
    <link rel="stylesheet" type="text/css" href="../css/main.css?v1.3.4" media="all">

    <link rel="stylesheet" type="text/css" href="../css/autocomplete.css" media="all">

</head>
<body>
    <div class="container-fluid larry-wrapper">
        <div class="row">
            <div class="col-xs-12 col-sm-12 col-md-12">
                <!--头部搜索-->
                <section class="panel panel-padding">
                    <form class="layui-form" action="/education/admin/dict">
                        <div class="layui-form">
                            <div class="layui-inline">
                                <select name="_query.type" id="qType"
                                        data-params='{"url": "/education/admin/dict"}'>
                                    <!--#include file="dict-select.html"-->
                                </select>
                            </div>
                            <div class="layui-inline">
                                <div class="layui-input-inline">
                                    <input class="layui-input" name="_query.keyword" placeholder="关键字">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <button lay-submit class="layui-btn" lay-filter="search">查找</button>
                            </div>
                        </div>
                    </form>
                </section>

                <!--列表-->
                <section class="panel panel-padding">

                    <div class="group-button">
                        <button class="layui-btn layui-btn-small modal-catch" beforeFun="beforeAdd"
                                data-params='{"content":".add-subcat", "title":"添加","type":"1", "area":"600px,580px", "maxmin":"true"}'>
                            <i class="iconfont">&#xe649;</i> 添加
                        </button>
                        <!--<button class="layui-btn layui-btn-small modal-catch" data-name="dictData"
                                data-params='{"content": ".add-subcat","area":"600px,400px","title":"编辑","key":"ids=","data":"url=\"/education/admin/dict/update\" ","type":"1"}'>
                            <i class="iconfont">&#xe653;</i>编辑
                        </button>-->
                        <button class="layui-btn layui-btn-small layui-btn-danger ajax-all" data-name="checkbox" data-params='{"url": "/education/admin/dict/delete"}'>
                            <i class="iconfont">&#xe626;</i> 删除
                        </button>
                    </div>
                    <div id="list" class="layui-form"></div>

                    <div class="text-right" id="page"></div>
                </section>
            </div>
        </div>
    </div>
    <div class="add-subcat">
        <form class="layui-form layui-form-pane" action="/education/admin/dict/save">
            <div class="layui-form-item">
                <label class="layui-form-label">类别</label>
                <div class="layui-input-inline">
                    <select name="type" id="type" required jq-verify="required" jq-error="请选择" lay-filter="filter">
                        <!--<optgroup label="场馆">
                            <option value="site.service">场馆服务</option>
                            <option value="site.type">类别</option>
                        </optgroup>
                        <optgroup label="赛制">
                            <option value="rule.zuqiu">足球</option>
                            <option value="rule.taiqiu">台球</option>
                            <option value="rule.wangqiu">网球</option>
                            <option value="rule.pingpangqiu">乒乓球</option>
                            <option value="rule.yumaoqiu">羽毛球</option>
                        </optgroup>
                        <optgroup label="用户">
                            <option value="user.hobby">兴趣爱好</option>
                        </optgroup>-->
                        <!--#include file="dict-select.html"-->
                    </select>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">编号</label>
                <div class="layui-input-block">
                    <input type="text" name="code" required
                           jq-verify="required" jq-error="请输入编号" class="layui-input ">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">名称</label>
                <div class="layui-input-block">
                    <input type="text" name="name" required jq-verify="required" jq-error="请输入值" class="layui-input ">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">值</label>
                <div class="layui-input-block">
                    <input type="text" name="value" required jq-verify="required" jq-error="请输入值" class="layui-input ">
                </div>
            </div>

            <div class="layui-form-item" id="extDiv" style="display: none">
                <label class="layui-form-label">参赛人数</label>
                <div class="layui-input-inline">
                    <input type="number" name="ext" jq-verify="number" jq-error="必须为数字"
                           class="layui-input ">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">排序</label>
                <div class="layui-input-inline">
                    <input type="number" name="ord" required jq-verify="number" jq-error="排序必须为数字"
                           class="layui-input ">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">状态</label>
                <div class="layui-input-inline">
                    <input type="radio" name="status" title="启用" value="1" checked />
                    <input type="radio" name="status" title="禁用" value="0" />
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" jq-submit jq-filter="submit">立即提交</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
        </form>
    </div>


</body>
<!--#include file="dict-list.html"-->
<script src="../js/layui/layui.js"></script>
<script type="text/javascript" src="../js/lib/jquery-1.11.2.min.js"></script>
<!--#include file="common/version.html"-->
<script>
    layui.use('user_list');
    function beforeAdd() {

    }

    layui.use('form', function(){
        var form = layui.form();
        form.on('select(filter)', function(data){
            if(data.value && data.value.indexOf('rule') == 0){
                $('#extDiv').show();
            } else{
                $('#extDiv').hide();
            }
        });
    });
</script>

</html>